package com.ruoyi.common.core.domain.model;

import com.alibaba.fastjson2.annotation.JSONField;
import org.springframework.security.core.GrantedAuthority;
import org.springframework.security.core.userdetails.UserDetails;

import java.util.Collection;
import java.util.Objects;

/* loaded from: CityLoginUser.class */
public class CityLoginUser implements UserDetails {
    private static final long   serialVersionUID = 1;
    private              Long   userId;
    private              String token;
    private              Long   loginTime;
    private              Long   expireTime;
    private              String ipaddr;
    private              String loginLocation;
    private              String browser;
    private              String os;
    private              String username;

    public boolean equals(Object o) {
        if (o == this) {
            return true;
        }
        if (!(o instanceof CityLoginUser)) {
            return false;
        }
        CityLoginUser other = (CityLoginUser) o;
        if (!other.canEqual(this)) {
            return false;
        }
        Object this$userId  = getUserId();
        Object other$userId = other.getUserId();
        if (this$userId == null) {
            if (other$userId != null) {
                return false;
            }
        }
        else if (!this$userId.equals(other$userId)) {
            return false;
        }
        Object this$loginTime  = getLoginTime();
        Object other$loginTime = other.getLoginTime();
        if (this$loginTime == null) {
            if (other$loginTime != null) {
                return false;
            }
        }
        else if (!this$loginTime.equals(other$loginTime)) {
            return false;
        }
        Object this$expireTime  = getExpireTime();
        Object other$expireTime = other.getExpireTime();
        if (this$expireTime == null) {
            if (other$expireTime != null) {
                return false;
            }
        }
        else if (!this$expireTime.equals(other$expireTime)) {
            return false;
        }
        Object this$token  = getToken();
        Object other$token = other.getToken();
        if (this$token == null) {
            if (other$token != null) {
                return false;
            }
        }
        else if (!this$token.equals(other$token)) {
            return false;
        }
        Object this$ipaddr  = getIpaddr();
        Object other$ipaddr = other.getIpaddr();
        if (this$ipaddr == null) {
            if (other$ipaddr != null) {
                return false;
            }
        }
        else if (!this$ipaddr.equals(other$ipaddr)) {
            return false;
        }
        Object this$loginLocation  = getLoginLocation();
        Object other$loginLocation = other.getLoginLocation();
        if (this$loginLocation == null) {
            if (other$loginLocation != null) {
                return false;
            }
        }
        else if (!this$loginLocation.equals(other$loginLocation)) {
            return false;
        }
        Object this$browser  = getBrowser();
        Object other$browser = other.getBrowser();
        if (this$browser == null) {
            if (other$browser != null) {
                return false;
            }
        }
        else if (!this$browser.equals(other$browser)) {
            return false;
        }
        Object this$os  = getOs();
        Object other$os = other.getOs();
        if (this$os == null) {
            if (other$os != null) {
                return false;
            }
        }
        else if (!this$os.equals(other$os)) {
            return false;
        }
        Object this$username  = getUsername();
        Object other$username = other.getUsername();
        return Objects.equals(this$username, other$username);
    }

    protected boolean canEqual(Object other) {
        return other instanceof CityLoginUser;
    }

    public int hashCode() {
        Object $userId        = getUserId();
        int    result         = (59) + ($userId == null ? 43 : $userId.hashCode());
        Object $loginTime     = getLoginTime();
        int    result2        = (result * 59) + ($loginTime == null ? 43 : $loginTime.hashCode());
        Object $expireTime    = getExpireTime();
        int    result3        = (result2 * 59) + ($expireTime == null ? 43 : $expireTime.hashCode());
        Object $token         = getToken();
        int    result4        = (result3 * 59) + ($token == null ? 43 : $token.hashCode());
        Object $ipaddr        = getIpaddr();
        int    result5        = (result4 * 59) + ($ipaddr == null ? 43 : $ipaddr.hashCode());
        Object $loginLocation = getLoginLocation();
        int    result6        = (result5 * 59) + ($loginLocation == null ? 43 : $loginLocation.hashCode());
        Object $browser       = getBrowser();
        int    result7        = (result6 * 59) + ($browser == null ? 43 : $browser.hashCode());
        Object $os            = getOs();
        int    result8        = (result7 * 59) + ($os == null ? 43 : $os.hashCode());
        Object $username      = getUsername();
        return (result8 * 59) + ($username == null ? 43 : $username.hashCode());
    }

    public String toString() {
        return "CityLoginUser(userId=" + getUserId() + ", token=" + getToken() + ", loginTime=" + getLoginTime() + ", expireTime=" + getExpireTime() + ", ipaddr=" + getIpaddr() + ", loginLocation=" + getLoginLocation() + ", browser=" + getBrowser() + ", os=" + getOs() + ", username=" + getUsername() + ")";
    }

    public Long getUserId() {
        return this.userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public String getToken() {
        return this.token;
    }

    public void setToken(String token) {
        this.token = token;
    }

    @JSONField(serialize = false)
    public boolean isAccountNonExpired() {
        return true;
    }

    @JSONField(serialize = false)
    public boolean isAccountNonLocked() {
        return true;
    }

    @JSONField(serialize = false)
    public boolean isCredentialsNonExpired() {
        return true;
    }

    @JSONField(serialize = false)
    public boolean isEnabled() {
        return true;
    }

    public Long getLoginTime() {
        return this.loginTime;
    }

    public void setLoginTime(Long loginTime) {
        this.loginTime = loginTime;
    }

    public String getIpaddr() {
        return this.ipaddr;
    }

    public void setIpaddr(String ipaddr) {
        this.ipaddr = ipaddr;
    }

    public String getLoginLocation() {
        return this.loginLocation;
    }

    public void setLoginLocation(String loginLocation) {
        this.loginLocation = loginLocation;
    }

    public String getBrowser() {
        return this.browser;
    }

    public void setBrowser(String browser) {
        this.browser = browser;
    }

    public String getOs() {
        return this.os;
    }

    public void setOs(String os) {
        this.os = os;
    }

    public Long getExpireTime() {
        return this.expireTime;
    }

    public void setExpireTime(Long expireTime) {
        this.expireTime = expireTime;
    }

    public Collection<? extends GrantedAuthority> getAuthorities() {
        return null;
    }

    public String getPassword() {
        return null;
    }

    public String getUsername() {
        return null;
    }

    public void setUsername(String username) {
        this.username = username;
    }
}
